#include <iostream>
using namespace std;
#include <map>

template <typename T,class Z>
struct Pair
{
    T first;
    Z second;
    Pair(T first,Z second)
    :first(first),second(second)
    {}
};

int main(int argc,char **argv)
{
    map<char,int> myMap;
    pair<char,int> p1('a',3);
    pair<char,int> p2('z',6);
    pair<char,int> p3('h',7);

    myMap.insert(p1);
    myMap.insert(p2);
    myMap.insert(p3);

    pair<map<char,int>::iterator,bool> ret;
    ret = myMap.insert(pair<char,int>('b',4));
    if(ret.second == false)
    {
        cout<<"添加失败"<<endl;
    }
    else
    {
        cout<<"添加成功"<<endl;
    }
    

    return 0;
}
